﻿<?xml version="1.0" encoding="utf-8"?>
<dbs:MetaDataRoot xmlns:dbs="http://kadgen/DatabaseStructure">
  <dbs:DataStructures>
    <dbs:DataStructure Name="GenDotNetSample">
      <dbs:Tables>
        <dbs:Table Name="Contact" OriginalName="Contact" Prefix="" SingularName="Contact" PluralName="Contacts" DisplayName="FirstName" Caption="Contact" PluralCaption="Contacts" XMLFriendlyName="Contact" InsertPriority="1" Schema="dbo">
          <dbs:TableColumns>
            <dbs:TableColumn Name="ContactId" OriginalName="ContactId" Caption="Contact Id" Ordinal="1" AllowNulls="false" SQLType="uniqueidentifier" NETType="System.Guid" IsPrimaryKey="true">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
            <dbs:TableColumn Name="CustomerId" OriginalName="CustomerId" Caption="Customer Id" Ordinal="2" AllowNulls="true" SQLType="uniqueidentifier" NETType="System.Guid" IsPrimaryKey="false">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
            <dbs:TableColumn Name="FirstName" OriginalName="FirstName" Caption="First Name" Ordinal="3" AllowNulls="true" SQLType="nvarchar" NETType="System.String" MaxLength="50" IsPrimaryKey="false">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
            <dbs:TableColumn Name="LastName" OriginalName="LastName" Caption="Last Name" Ordinal="4" AllowNulls="true" SQLType="nvarchar" NETType="System.String" MaxLength="50" IsPrimaryKey="false">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
          </dbs:TableColumns>
          <dbs:TablePrivileges />
          <dbs:PrimaryKey>
            <dbs:PKField Name="ContactId" Ordinal="1" />
          </dbs:PrimaryKey>
          <dbs:ParentTables>
            <dbs:ParentTable Name="Customer">
              <dbs:ParentKeyField Name="CustomerId" Ordinal="1" />
              <dbs:ChildField Name="CustomerId" Ordinal="1" />
            </dbs:ParentTable>
          </dbs:ParentTables>
          <dbs:ChildTables>
            <dbs:ChildTable Name="PhoneNumber">
              <dbs:ChildKeyField Name="ContactId" Ordinal="1" />
              <dbs:ParentKeyField Name="ContactId" Ordinal="1" />
            </dbs:ChildTable>
          </dbs:ChildTables>
        </dbs:Table>
        <dbs:Table Name="PhoneNumberCategory" OriginalName="PhoneNumberCategory" Prefix="" SingularName="PhoneNumberCategory" PluralName="PhoneNumberCategories" DisplayName="Description" Caption="Phone Number Category" PluralCaption="Phone Number Categories" XMLFriendlyName="PhoneNumberCategory" InsertPriority="0" Schema="dbo">
          <dbs:TableColumns>
            <dbs:TableColumn Name="PhoneNumberCategoryId" OriginalName="PhoneNumberCategoryId" Caption="Phone Number Category Id" Ordinal="1" AllowNulls="false" SQLType="uniqueidentifier" NETType="System.Guid" IsPrimaryKey="true">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
            <dbs:TableColumn Name="Description" OriginalName="Description" Caption="Description" Ordinal="2" AllowNulls="true" SQLType="nvarchar" NETType="System.String" MaxLength="50" IsPrimaryKey="false">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
          </dbs:TableColumns>
          <dbs:TablePrivileges />
          <dbs:PrimaryKey>
            <dbs:PKField Name="PhoneNumberCategoryId" Ordinal="1" />
          </dbs:PrimaryKey>
          <dbs:ChildTables>
            <dbs:ChildTable Name="PhoneNumber">
              <dbs:ChildKeyField Name="PhoneNumberCategoryId" Ordinal="1" />
              <dbs:ParentKeyField Name="PhoneNumberCategoryId" Ordinal="1" />
            </dbs:ChildTable>
          </dbs:ChildTables>
        </dbs:Table>
        <dbs:Table Name="Customer" OriginalName="Customer" Prefix="" SingularName="Customer" PluralName="Customers" DisplayName="CompanyName" Caption="Customer" PluralCaption="Customers" XMLFriendlyName="Customer" InsertPriority="0" Schema="dbo">
          <dbs:TableColumns>
            <dbs:TableColumn Name="CustomerId" OriginalName="CustomerId" Caption="Customer Id" Ordinal="1" AllowNulls="false" SQLType="uniqueidentifier" NETType="System.Guid" IsPrimaryKey="true">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
            <dbs:TableColumn Name="CompanyName" OriginalName="CompanyName" Caption="Company Name" Ordinal="2" AllowNulls="false" SQLType="nvarchar" NETType="System.String" MaxLength="50" IsPrimaryKey="false">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
          </dbs:TableColumns>
          <dbs:TablePrivileges />
          <dbs:PrimaryKey>
            <dbs:PKField Name="CustomerId" Ordinal="1" />
          </dbs:PrimaryKey>
          <dbs:ChildTables>
            <dbs:ChildTable Name="Contact">
              <dbs:ChildKeyField Name="CustomerId" Ordinal="1" />
              <dbs:ParentKeyField Name="CustomerId" Ordinal="1" />
            </dbs:ChildTable>
          </dbs:ChildTables>
        </dbs:Table>
        <dbs:Table Name="PhoneNumber" OriginalName="PhoneNumber" Prefix="" SingularName="PhoneNumber" PluralName="PhoneNumbers" DisplayName="PhoneNumber" Caption="Phone Number" PluralCaption="Phone Numbers" XMLFriendlyName="PhoneNumber" InsertPriority="2" Schema="dbo">
          <dbs:TableColumns>
            <dbs:TableColumn Name="PhoneNumberId" OriginalName="PhoneNumberId" Caption="Phone Number Id" Ordinal="1" AllowNulls="false" SQLType="uniqueidentifier" NETType="System.Guid" IsPrimaryKey="true">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
            <dbs:TableColumn Name="ContactId" OriginalName="ContactId" Caption="Contact Id" Ordinal="2" AllowNulls="true" SQLType="uniqueidentifier" NETType="System.Guid" IsPrimaryKey="false">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
            <dbs:TableColumn Name="PhoneNumber" OriginalName="PhoneNumber" Caption="Phone Number" Ordinal="3" AllowNulls="true" SQLType="nvarchar" NETType="System.String" MaxLength="20" IsPrimaryKey="false">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
            <dbs:TableColumn Name="PhoneNumberCategoryId" OriginalName="PhoneNumberCategoryId" Caption="Phone Number Category Id" Ordinal="4" AllowNulls="true" SQLType="uniqueidentifier" NETType="System.Guid" IsPrimaryKey="false">
              <dbs:TablePrivileges />
            </dbs:TableColumn>
          </dbs:TableColumns>
          <dbs:TablePrivileges />
          <dbs:PrimaryKey>
            <dbs:PKField Name="PhoneNumberId" Ordinal="1" />
          </dbs:PrimaryKey>
          <dbs:ParentTables>
            <dbs:ParentTable Name="PhoneNumberCategory">
              <dbs:ParentKeyField Name="PhoneNumberCategoryId" Ordinal="1" />
              <dbs:ChildField Name="PhoneNumberCategoryId" Ordinal="1" />
            </dbs:ParentTable>
            <dbs:ParentTable Name="Contact">
              <dbs:ParentKeyField Name="ContactId" Ordinal="1" />
              <dbs:ChildField Name="ContactId" Ordinal="1" />
            </dbs:ParentTable>
          </dbs:ParentTables>
        </dbs:Table>
      </dbs:Tables>
      <dbs:UserDefinedTypes />
      <dbs:StoredProcs>
        <dbs:StoredProc Name="Select_Contact" Created="3/29/2008 9:55:16 AM" Modified="3/29/2008 9:55:16 AM" Type="Retrieve">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@ContactId" Ordinal="1" Type="uniqueidentifier" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:DataSet>
            <dbs:Recordset Name="Table">
              <dbs:Column Name="ContactId" NETType="System.Guid" Caption="Contact Id" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="0" />
              <dbs:Column Name="CustomerId" NETType="System.Guid" Caption="Customer Id" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="1" />
              <dbs:Column Name="FirstName" NETType="System.String" Caption="First Name" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="2" />
              <dbs:Column Name="LastName" NETType="System.String" Caption="Last Name" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="3" />
            </dbs:Recordset>
          </dbs:DataSet>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="Select_Customer" Created="3/29/2008 9:55:17 AM" Modified="3/29/2008 9:55:17 AM" Type="Retrieve">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@CustomerId" Ordinal="1" Type="uniqueidentifier" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:DataSet>
            <dbs:Recordset Name="Table">
              <dbs:Column Name="CustomerId" NETType="System.Guid" Caption="Customer Id" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="0" />
              <dbs:Column Name="CompanyName" NETType="System.String" Caption="Company Name" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="1" />
            </dbs:Recordset>
          </dbs:DataSet>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="Select_PhoneNumber" Created="3/29/2008 9:55:18 AM" Modified="3/29/2008 9:55:18 AM" Type="Retrieve">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@PhoneNumberId" Ordinal="1" Type="uniqueidentifier" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:DataSet>
            <dbs:Recordset Name="Table">
              <dbs:Column Name="PhoneNumberId" NETType="System.Guid" Caption="Phone Number Id" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="0" />
              <dbs:Column Name="ContactId" NETType="System.Guid" Caption="Contact Id" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="1" />
              <dbs:Column Name="PhoneNumber" NETType="System.String" Caption="Phone Number" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="2" />
              <dbs:Column Name="PhoneNumberCategoryId" NETType="System.Guid" Caption="Phone Number Category Id" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="3" />
            </dbs:Recordset>
          </dbs:DataSet>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="Select_PhoneNumberCategory" Created="3/29/2008 9:55:17 AM" Modified="3/29/2008 9:55:17 AM" Type="Retrieve">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@PhoneNumberCategoryId" Ordinal="1" Type="uniqueidentifier" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:DataSet>
            <dbs:Recordset Name="Table">
              <dbs:Column Name="PhoneNumberCategoryId" NETType="System.Guid" Caption="Phone Number Category Id" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="0" />
              <dbs:Column Name="Description" NETType="System.String" Caption="Description" AllowDBNull="true" AutoIncrement="false" DefaultValue="" MaxLength="-1" Unique="false" Ordinal="1" />
            </dbs:Recordset>
          </dbs:DataSet>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="sp_alterdiagram" Created="3/29/2008 9:41:31 AM" Modified="3/29/2008 9:41:31 AM" microsoft_database_tools_support="1">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@diagramname" Ordinal="1" Type="nvarchar" MaxLength="128" Direction="IN" />
            <dbs:StoredProcParameter Name="@owner_id" Ordinal="2" Type="int" Direction="IN" />
            <dbs:StoredProcParameter Name="@version" Ordinal="3" Type="int" Direction="IN" />
            <dbs:StoredProcParameter Name="@definition" Ordinal="4" Type="varbinary" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="sp_creatediagram" Created="3/29/2008 9:41:31 AM" Modified="3/29/2008 9:41:31 AM" microsoft_database_tools_support="1">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@diagramname" Ordinal="1" Type="nvarchar" MaxLength="128" Direction="IN" />
            <dbs:StoredProcParameter Name="@owner_id" Ordinal="2" Type="int" Direction="IN" />
            <dbs:StoredProcParameter Name="@version" Ordinal="3" Type="int" Direction="IN" />
            <dbs:StoredProcParameter Name="@definition" Ordinal="4" Type="varbinary" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="sp_dropdiagram" Created="3/29/2008 9:41:31 AM" Modified="3/29/2008 9:41:31 AM" microsoft_database_tools_support="1">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@diagramname" Ordinal="1" Type="nvarchar" MaxLength="128" Direction="IN" />
            <dbs:StoredProcParameter Name="@owner_id" Ordinal="2" Type="int" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="sp_helpdiagramdefinition" Created="3/29/2008 9:41:31 AM" Modified="3/29/2008 9:41:31 AM" microsoft_database_tools_support="1">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@diagramname" Ordinal="1" Type="nvarchar" MaxLength="128" Direction="IN" />
            <dbs:StoredProcParameter Name="@owner_id" Ordinal="2" Type="int" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="sp_helpdiagrams" Created="3/29/2008 9:41:31 AM" Modified="3/29/2008 9:41:31 AM" microsoft_database_tools_support="1">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@diagramname" Ordinal="1" Type="nvarchar" MaxLength="128" Direction="IN" />
            <dbs:StoredProcParameter Name="@owner_id" Ordinal="2" Type="int" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="sp_renamediagram" Created="3/29/2008 9:41:31 AM" Modified="3/29/2008 9:41:31 AM" microsoft_database_tools_support="1">
          <dbs:StoredProcParameters>
            <dbs:StoredProcParameter Name="@diagramname" Ordinal="1" Type="nvarchar" MaxLength="128" Direction="IN" />
            <dbs:StoredProcParameter Name="@owner_id" Ordinal="2" Type="int" Direction="IN" />
            <dbs:StoredProcParameter Name="@new_diagramname" Ordinal="3" Type="nvarchar" MaxLength="128" Direction="IN" />
          </dbs:StoredProcParameters>
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
        <dbs:StoredProc Name="sp_upgraddiagrams" Created="3/29/2008 9:41:31 AM" Modified="3/29/2008 9:41:31 AM" microsoft_database_tools_support="1">
          <dbs:StoredProcParameters />
          <dbs:StoredProcPrivileges />
        </dbs:StoredProc>
      </dbs:StoredProcs>
      <dbs:Functions>
        <dbs:Function Name="fn_diagramobjects" Created="3/29/2008 9:41:31 AM" Modified="3/29/2008 9:41:31 AM">
          <dbs:StoredProcParameters />
          <dbs:StoredProcPrivileges />
        </dbs:Function>
      </dbs:Functions>
      <dbs:Views />
      <dbs:Hierarchy>
        <dbs:HTable Name="PhoneNumberCategory">
          <dbs:HTable Name="PhoneNumber" />
        </dbs:HTable>
        <dbs:HTable Name="Customer">
          <dbs:HTable Name="Contact">
            <dbs:HTable Name="PhoneNumber" />
          </dbs:HTable>
        </dbs:HTable>
      </dbs:Hierarchy>
    </dbs:DataStructure>
  </dbs:DataStructures>
</dbs:MetaDataRoot>